/*
 * Queue.h
 *
 *  Created on: 09.01.2013
 *      Author: phru
 */

#ifndef QUEUE_H_
#define QUEUE_H_

#include <iostream>
#include <list>
using namespace std;

template<class T>
class Queue {

private:
	list<T> m_list;
public:

	Queue() {

	}

	~Queue() {

	}

	/**
	 * Add object to queue
	 */
	void enqueue(const T& value) {
		m_list.insert(m_list.end(), value);
		printf("New value is: %d \n", value);
	}

	bool isEmpty() {
		return m_list.size() == 0;
	}

	T& dequeue() {

		T& value = m_list.front();
		printf("Dequeue value is: %d\n", value);
		m_list.erase(m_list.begin());
		return value;
	}

};

#endif /* QUEUE_H_ */
